/*    */ package com.liy.cloud.auth.client.feign;
/*    */ 
/*    */ import com.das.framework.common.extvo.ResultVO;
/*    */ import feign.hystrix.FallbackFactory;
/*    */ import org.slf4j.Logger;
/*    */ import org.slf4j.LoggerFactory;
/*    */ import org.springframework.stereotype.Component;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Component
/*    */ public class AuthorizationFeignClientFallbackFactory
/*    */   extends Object
/*    */   implements FallbackFactory<AuthorizationFeignClient>
/*    */ {
/* 18 */   private static final Logger log = LoggerFactory.getLogger(AuthorizationFeignClientFallbackFactory.class);
/*    */ 
/*    */ 
/*    */   
/*    */   public AuthorizationFeignClient create(final Throwable e) {
/* 23 */     log.info("sys feign fallback; reason was: {}", e.getMessage());
/*    */     
/* 25 */     return new AuthorizationFeignClient()
/*    */       {
/*    */         public ResultVO authorization(String token)
/*    */         {
/* 29 */           return defaultResultVO();
/*    */         }
/*    */ 
/*    */ 
/*    */         
/* 34 */         public ResultVO hasPermission(String token, String code) { return defaultResultVO(); }
/*    */ 
/*    */ 
/*    */ 
/*    */         
/* 39 */         public ResultVO getUserPublicKey(String clientId, String secret) { return defaultResultVO(); }
/*    */ 
/*    */ 
/*    */ 
/*    */         
/* 44 */         public ResultVO permissionSync(Object obj) { return defaultResultVO(); }
/*    */ 
/*    */ 
/*    */         
/* 48 */         private ResultVO defaultResultVO() { return new ResultVO(false, "认证服务异常: " + e.getMessage(), "500"); }
/*    */       };
/*    */   }
/*    */ }


/* Location:              C:\Users\admin\Desktop\Jar\das-cloud-osc\das-cloud-osc-auth-client-1.0.0-SNAPSHOT.jar!\com\das\cloud\auth\client\feign\AuthorizationFeignClientFallbackFactory.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */